accessibility
Macromedia Logo Upper Navigation Bar
 Help
Lower Navigation Bar
ProductsSupportDesigner DeveloperDownloadsStoreInternationalSite MapCompany
Home > Products > Fireworks > Support > TechNote Index
Macromedia Fireworks Support Center - TechNotes

Troubleshooting paths to images and other files in your FrontPage HTML code

Product: Fireworks
Platform: All
Versions: MX
ID: 16650
How useful was this document?
less more

1

2

3

4

5

How can the document be improved? (300 characters or less - you will not receive a reply.)

When you export HTML and images to your FrontPage website from Macromedia Fireworks, you specify the folder to which those files will be exported. Fireworks does the rest. In the HTML file, Fireworks writes code for the paths to all of the images, it writes code for the path to the JavaScript file if you have Pop-up Menus, and it exports those files to the appropriate locations so that these paths are all correct.

Prerequisites
Using and understanding this TechNote assumes you have already read Exporting and inserting Fireworks HTML into FrontPage (TechNote 16633). Refer to the Additional information section for more TechNotes relating to working with Fireworks-generated code in FrontPage
.

Troubleshooting links to external files
Although Fireworks will export the files and write the code properly, you can break the paths in the HTML file after export. The following describes the most common ways paths become broken after export.

> If the files have been moved since you first exported, the paths may no longer reflect the actual location of these dependent files relative to the HTML file.
>

If you insert the Fireworks HTML file into another HTML file, and the other HTML file is located in a different folder than the Fireworks HTML file, then the paths (although correct for the Fireworks HTML file) may not be correct for the new HTML file.

Fixing paths to broken images
If any images appear broken in the Preview tab in FrontPage, do the following steps.

1 Open the page containing the broken path in FrontPage, and click the HTML tab to view the code.
2 Search for instances of image tags (coded with <img>). Each image that was exported from Fireworks will have a path in the <img> tag that looks like this:
 

<img src="images/new_image.gif" width="500" height="156">

In this example, the path (indicated by the value given to the src attribute: images/new_image.gif) shows that the image is in a subfolder named images, and the images folder is located in the same folder that also holds the HTML file. If the image is not found in this designated folder, or if this folder is not found in the expected place, then the path to this image will be broken and the Preview tab will display the icon for a broken image.

  Broken images displayed in the Preview tab
3 Change the path to the image so that it is correct. You can type the code for the correct path directly into the source code, or you can replace the code using Picture Properties (right-click anywhere in the tag code, choose Tag Properties, click the General tab, and browse to locate the image).
4

If your file contains buttons, the images used for the rollovers are "preloaded" using an array that is written to a script tag in the table tag. The paths to these images may be incorrect. Look inside the table tag that contains the buttons, and change the path to the images referenced in the <script> tag.

Note: If this step is not completed, the page and the behaviors will still work, there just may be a delay the first time a button is moused over.

Fixing paths for Pop-up Menus
If your file has Pop-up Menus, there are some specific paths you will need to check in addition to paths to any images as discussed above.

1 If your Pop-up Menus use background images, the paths to these images might be broken. Look in the mmLoadMenus function JavaScript code for images named "mmmenu#_wwxhh_up.gif" and "mmmenu#_wwxhh_over.gif" (where # represents a single number and "ww" and "hh" represents the image's width and height in pixels).
2 Correct the path to the image. This will have to be changed in the code by hand.
3 If your Pop-up Menus have submenus, the paths to the arrow images might be broken. Look in the mmLoadMenus function JavaScript code for code that references a file called arrows.gif.
4 Correct the path to the image. This will have to be changed in the code by hand.
5 The path to the external JavaScript file must be checked. This line of code should have been pasted above the </head> tag if following the Exporting and inserting Fireworks HTML into FrontPage (TechNote 16633). It may be above another <script> tag containing the function code.
6 The path to the JavaScript file (mm_menu.js) must be correct in order for the Pop-up Menus to work. Make sure this path is correct.
  The path to the JavaScript file should be checked

Summary
It's always best to plan your site and directory structure before you export your files from Fireworks. Fireworks generates HTML that contains Document-Relative links to all image and JavaScript files. Attempts at moving HTML and image files after they have been exported can result in costly and time-consuming exta work for the developer. Avoid these problems by carefully planning your site and where you will export ahead of time.

Additional information
The following TechNotes are written for FrontPage users. These TechNotes will be most useful for readers if consulted in the order listed.

> Exporting and inserting Fireworks HTML into FrontPage (TechNote 16633)
> Details about Fireworks Pop-up Menu code for FrontPage (TechNote 16635)
> (This TechNote) Troubleshooting paths to images and other files in your FrontPage HTML code (TechNote 16650)
> Roundtrip editing Fireworks MX images from FrontPage (TechNote 16653)


Last updated: January 10, 2003
Keywords: FrontPage, HTML, links, images, javascript, location, path, document relative
Created: November 6, 2002
©1995-2003 Macromedia, Inc. All rights reserved.
Use of this website signifies your agreement to the Terms of Use.
Privacy | Site Map
| Contact us | Accessibility | Report Piracy